<template>
    <div >
        <el-form ref="form" :model="form" label-width="100px" style="width: 500px" >
            <el-form-item label="工程名称">
            <el-input v-model="form.name"></el-input>

          </el-form-item>
          <el-form-item label="坑壁土类型" label-width="200px" :model="formLabelAlign">
            <el-select v-model="form.region" placeholder="请选择类型">
              <el-option label="填土" value="填土"></el-option>          
            </el-select>
          </el-form-item>

          <el-form :label-position="labelPosition" label-width="400px" :model="formLabelAlign">
            <el-form-item label="混凝土重力密度γc(kN/m3)" style="width: 500px"  >
                <el-input v-model="form.r"></el-input>
            </el-form-item>
            <el-form-item label="新浇混凝土初凝时间t0(h)" style="width: 500px">
                <el-input v-model="form.t"></el-input>
            </el-form-item>
            <el-form-item label="外加剂影响修正系数β1" style="width: 500px">
                <el-input v-model="form.b1"></el-input>
            </el-form-item>
            <el-form-item label="混凝土坍落度影响修正系数β2" style="width: 500px">
                <el-input v-model="form.b2"></el-input>
            </el-form-item>
            <el-form-item label="混凝土浇筑速度V(m/h)" style="width: 500px">
                <el-input v-model="form.v"></el-input>
            </el-form-item>
            <el-form-item label="混凝土侧压力计算位置处至新浇混凝土顶面总高度H(m)" style="width: 500px">
                <el-input v-model="form.h"></el-input>
            </el-form-item>





            <el-form-item label="侧压力计算依据规范" style="width: 1000px">
            <el-input
              placeholder="《建筑施工模板安全技术规范》JGJ162-2008"
              v-model="input"
              :disabled="true">
            </el-input>
            </el-form-item>

            <el-form-item label="倾倒混凝土时对垂直面模板荷载标准值Q3k(kN/m2)" style="width: 500px">
            <el-input
              placeholder="2"
              v-model="input"
              :disabled="true">
            </el-input>
            </el-form-item>

            <el-form-item label="结构重要性系数γ0" style="width: 500px">
            <el-input
              placeholder="1"
              v-model="input"
              :disabled="true">
            </el-input>
            </el-form-item>

            <el-form-item label="可变荷载调整系数γL" style="width: 500px">
            <el-input
              placeholder="0.9"
              v-model="input"
              :disabled="true">
            </el-input>
            </el-form-item>

            <el-form-item label="新浇混凝土对模板的侧压力标准值G4k(kN/m2)" style="width: 800px">
            <el-input
              placeholder="min{0.22*γ*ct0*β1*β2*v1/2，γcH}"
              v-model="input"
              :disabled="true">
            </el-input>
            </el-form-item>
  

        </el-form>
            <el-form-item align="center" >
            <el-button type="primary" @click="onSubmit">立即计算</el-button>
            <el-button type="default"  @click="exit">清空</el-button>
            </el-form-item> 
        </el-form>  


      <h2 v-if="form.g>0" align="center">新浇混凝土对模板的侧压力标准值G4k＝min[0.22γct0β1β2v1/2，γcH]＝min[0.22×{{form.r}}×{{form.t}}×{{form.b1}}×{{form.b2}}×{{form.v}}   1/2次方，{{form.r}}×{{form.h}}]＝min[{{form.g1}},{{form.g2}}]＝{{form.g}}kN/m2<br>
          S承＝γ0×(1.3G4k+γL×1.5Q4k)=1×(1.3 × {{form.g}}+ 0.9×1.5×2.000)＝{{form.s}}kN/m2<br>
          正常使用极限状态设计值S正＝G4k＝{{form.g}} kN/m2
      </h2>


    </div>

   

    
</template>










  <script>
    import gc from '@/api/gongcheng'
    export default {
      data() {
        return {
          form: {            
            h:'',
            r:'',
            b1:'',
            b2:'',
            name: '',
            v:''  ,
            s:'',
            g:'',
            g1:'',
            g2:''
                                
          },
          input: ''
        }
      },
      created(){
        
      },


      methods: {
        onSubmit() {
          gc.getMb(this.form)
              .then(response => {//计算成功
                this.form.s =response.data.muban.s
                this.form.g =response.data.muban.g
                this.form.g1 =response.data.muban.g1
                this.form.g2 =response.data.muban.g2

                console.log(this.form.g1)
                console.log(this.form.g2)
                
                console.log(response.data.muban.s)
                console.log(response.data.muban.g)
                //提示信息
                this.$message({
                  type: 'success',
                  message: '计算成功!'
                }); 
                //回到列表页面 路由跳转
                //  this.$router.push({path:'/gongcheng/tufang'})

            })
          },
          exit(){
            
            this.form={
              g:0,
            }
        },
      
    }
        
    }
  
  </script>